//
//  BaseHeadViewController.m
//  MigrantBird
//
//  Created by michael shen on 16/6/16.
//  Copyright © 2016年 fc. All rights reserved.
//

#import "BaseHeadViewController.h"
@interface BaseHeadViewController ()
@property (nonatomic,strong) UILabel *titleLabel;

@end
@implementation BaseHeadViewController

-(void)viewDidLoad{
    [super viewDidLoad];
//    int headHeight = 0;
//    if (kDevice_Is_iPhoneX) {
//        headHeight =
//    }
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, StatusBarHeight+44)];
    view.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:view];
    
    UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, StatusBarHeight, SCREEN_WIDTH,44)];
    titleLabel.textAlignment = NSTextAlignmentCenter;
    titleLabel.font = [UIFont boldSystemFontOfSize:16];
    [self.view addSubview:titleLabel];
    self.titleLabel = titleLabel;
    
    UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(0, StatusBarHeight+43, SCREEN_WIDTH, 1.0)];
    lineView.backgroundColor = [UIColor colorWithRed:0.86 green:0.86 blue:0.86 alpha:1.0f];
    [self.view addSubview:lineView];
    
}

-(void)setTitleName:(NSString *)titleName{
    _titleName = titleName;
    _titleLabel.text = _titleName;
}

@end
